﻿<?xml version="1.0" encoding="utf-8" ?>
<c2eventsheet>
    <!--All the 'name' attributes are ignored by Construct 2 - they are there for readability only.-->
    <name>Main Events</name>
    <events>
        <variable constant="0" name="Laps" static="0" type="number">0</variable>
        <variable constant="0" name="IntendedScale" static="0" type="number">1</variable>
        <event-block>
            <conditions>
                <condition id="-1" name="Every tick" type="System" />
            </conditions>
            <actions>
                <action id="-9" name="Set value" type="System">
                    <param id="0" name="Variable">IntendedScale</param>
                    <param id="1" name="Value">1.2 - Minivan.Car.Speed/1000</param>
                </action>
                <action id="-17" name="Set layer scale" type="System">
                    <param id="0" name="Layer">&quot;Main&quot;</param>
                    <param id="1" name="Scale">lerp(LayerScale(&quot;Main&quot;), IntendedScale, 0.01)</param>
                </action>
                <action id="-17" name="Set layer scale" type="System">
                    <param id="0" name="Layer">&quot;Background&quot;</param>
                    <param id="1" name="Scale">LayerScale(&quot;Main&quot;)</param>
                </action>
            </actions>
        </event-block>
        <event-block>
            <conditions>
                <condition id="0" name="On collision with another object" type="Minivan">
                    <param id="0" name="Object">Milestone</param>
                </condition>
            </conditions>
            <actions>
                <action id="-10" name="Add to" type="System">
                    <param id="0" name="Variable">Laps</param>
                    <param id="1" name="Value">0.5</param>
                </action>
                <action id="0" name="Set text" type="Laps">
                    <param id="0" name="Text">&quot;Laps: &quot; &amp; floor(Laps)</param>
                </action>
            </actions>
        </event-block>
    </events>
</c2eventsheet>
